package mvp.levelup.spring.reports;

import mvp.levelup.spring.reports.reporters.IReporter;
import mvp.levelup.spring.reports.writters.IWritter;

/**
 * Created by Valera on 17.08.2014.
 */
public class ReportCreator2 {
    private IReporter reporter;
    private IWritter writter;
    private Configurator configurator;

    public ReportCreator2() {

    }

    public void postContruct(){
        configurator.prepareAll();
    }

    public void preDestroy(){
        System.out.println("Destroyed!");
    }

    public void createReport() {
        String report = reporter.createReport();
        writter.writeReport(report);
    }

    public IReporter getReporter() {
        return reporter;
    }

    public void setReporter(IReporter reporter) {
        this.reporter = reporter;
    }

    public IWritter getWritter() {
        return writter;
    }

    public void setWritter(IWritter writter) {
        this.writter = writter;
    }

    public Configurator getConfigurator() {
        return configurator;
    }

    public void setConfigurator(Configurator configurator) {
        this.configurator = configurator;
    }
}
